/*
 * Copyright 2010 Rasmus Toftdahl Olesen <rasmus@sequanto.com>
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); you
 * may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *     http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
 * implied. See the License for the specific language governing
 * permissions and limitations under the License.
 */

#include "config.h"

#include "sequanto/ui.h"

const char * const SQ_WIDGET_TYPE_UNKNOWN_STRING SQ_CONST_VARIABLE = "Unknown";
const char * const SQ_WIDGET_TYPE_WIDGET_STRING SQ_CONST_VARIABLE = "Widget";
const char * const SQ_WIDGET_TYPE_CONTAINER_STRING SQ_CONST_VARIABLE = "Container";
const char * const SQ_WIDGET_TYPE_BUTTON_STRING SQ_CONST_VARIABLE = "Button";
const char * const SQ_WIDGET_TYPE_LABEL_STRING SQ_CONST_VARIABLE = "Label";
const char * const SQ_WIDGET_TYPE_CHECK_BOX_STRING SQ_CONST_VARIABLE = "CheckBox";
const char * const SQ_WIDGET_TYPE_RADIO_BUTTON_STRING SQ_CONST_VARIABLE = "RadioButton";
const char * const SQ_WIDGET_TYPE_TEXT_BOX_STRING SQ_CONST_VARIABLE = "TextBox";
const char * const SQ_WIDGET_TYPE_MENU_BAR_STRING SQ_CONST_VARIABLE = "MenuBar";
const char * const SQ_WIDGET_TYPE_MENU_ITEM_STRING SQ_CONST_VARIABLE = "MenuItem";
const char * const SQ_WIDGET_TYPE_STATUS_BAR_STRING SQ_CONST_VARIABLE = "StatusBar";
const char * const SQ_WIDGET_TYPE_SLIDER_STRING SQ_CONST_VARIABLE = "Slider";
const char * const SQ_WIDGET_TYPE_SCROLL_AREA_STRING SQ_CONST_VARIABLE = "ScrollArea";
const char * const SQ_WIDGET_TYPE_TABLE_STRING SQ_CONST_VARIABLE = "Table";
const char * const SQ_WIDGET_TYPE_TABS_STRING SQ_CONST_VARIABLE = "Tabs";
const char * const SQ_WIDGET_TYPE_TOOL_BAR_STRING SQ_CONST_VARIABLE = "ToolBar";
const char * const SQ_WIDGET_TYPE_PROGRESS_BAR_STRING SQ_CONST_VARIABLE = "ProgressBar";
const char * const SQ_WIDGET_TYPE_LIST_STRING SQ_CONST_VARIABLE = "List";
const char * const SQ_WIDGET_TYPE_COMBO_BOX_STRING SQ_CONST_VARIABLE = "ComboBox";

const char * const SQ_UI_BUTTON_TEXT SQ_CONST_VARIABLE = "text";
const char * const SQ_UI_CHECK_BOX_TEXT SQ_CONST_VARIABLE = "text";
const char * const SQ_UI_CHECK_BOX_CHECKED SQ_CONST_VARIABLE = "checked";
const char * const SQ_UI_COMBO_BOX_EDITABLE SQ_CONST_VARIABLE = "editable";
const char * const SQ_UI_COMMON_BASE_NATIVE_TYPE SQ_CONST_VARIABLE = "nativeType";
const char * const SQ_UI_COMMON_BASE_NATIVE_ID SQ_CONST_VARIABLE = "nativeId";
const char * const SQ_UI_COMMON_BASE_WIDTH SQ_CONST_VARIABLE = "width";
const char * const SQ_UI_COMMON_BASE_HEIGHT SQ_CONST_VARIABLE = "height";
const char * const SQ_UI_COMMON_BASE_VISIBLE SQ_CONST_VARIABLE = "visible";
const char * const SQ_UI_COMMON_BASE_CHILDREN SQ_CONST_VARIABLE = "children";
const char * const SQ_UI_COMMON_BASE_AUTO_GENERATED_NAME SQ_CONST_VARIABLE = "autoGeneratedName";
const char * const SQ_UI_COMMON_BASE_ENABLED SQ_CONST_VARIABLE = "enabled";
const char * const SQ_UI_DEBUGGING_VERIFY_INTEGRITY SQ_CONST_VARIABLE = "verifyIntegrity";
const char * const SQ_UI_LABEL_TEXT SQ_CONST_VARIABLE = "text";
const char * const SQ_UI_LIST_LINES SQ_CONST_VARIABLE = "lines";
const char * const SQ_UI_LIST_UPDATE SQ_CONST_VARIABLE = "update";
const char * const SQ_UI_LIST_LINE_TEXT SQ_CONST_VARIABLE = "lineText";
const char * const SQ_UI_LIST_LINE_HEIGHT SQ_CONST_VARIABLE = "lineHeight";
const char * const SQ_UI_MENU_ITEM_TEXT SQ_CONST_VARIABLE = "text";
const char * const SQ_UI_MOUSE_MOVE SQ_CONST_VARIABLE = "move";
const char * const SQ_UI_MOUSE_CLICK SQ_CONST_VARIABLE = "click";
const char * const SQ_UI_MOUSE_CAPTURE SQ_CONST_VARIABLE = "capture";
const char * const SQ_UI_RADIO_BUTTON_TEXT SQ_CONST_VARIABLE = "text";
const char * const SQ_UI_RADIO_BUTTON_CHECKED SQ_CONST_VARIABLE = "checked";
const char * const SQ_UI_ROOT_WINDOWS SQ_CONST_VARIABLE = "windows";
const char * const SQ_UI_ROOT_ACTIVE_WINDOW SQ_CONST_VARIABLE = "activeWindow";
const char * const SQ_UI_ROOT_SCREEN SQ_CONST_VARIABLE = "screen";
const char * const SQ_UI_ROOT_MOUSE SQ_CONST_VARIABLE = "mouse";
const char * const SQ_UI_ROOT_DEBUGGING SQ_CONST_VARIABLE = "debugging";
const char * const SQ_UI_SCREEN_WIDTH SQ_CONST_VARIABLE = "width";
const char * const SQ_UI_SCREEN_HEIGHT SQ_CONST_VARIABLE = "height";
const char * const SQ_UI_SLIDER_VALUE SQ_CONST_VARIABLE = "value";
const char * const SQ_UI_SLIDER_MINIMUM SQ_CONST_VARIABLE = "minimum";
const char * const SQ_UI_SLIDER_MAXIMUM SQ_CONST_VARIABLE = "maximum";
const char * const SQ_UI_TABLE_ROWS SQ_CONST_VARIABLE = "rows";
const char * const SQ_UI_TABLE_COLUMNS SQ_CONST_VARIABLE = "columns";
const char * const SQ_UI_TABLE_ROW_HEADER_WIDTH SQ_CONST_VARIABLE = "rowHeaderWidth";
const char * const SQ_UI_TABLE_COLUMN_HEADER_HEIGHT SQ_CONST_VARIABLE = "columnHeaderHeight";
const char * const SQ_UI_TABLE_UPDATE SQ_CONST_VARIABLE = "update";
const char * const SQ_UI_TABLE_CELL_TEXT SQ_CONST_VARIABLE = "cellText";
const char * const SQ_UI_TABLE_ROW_HEIGHT SQ_CONST_VARIABLE = "rowHeight";
const char * const SQ_UI_TABLE_COLUMN_WIDTH SQ_CONST_VARIABLE = "columnWidth";
const char * const SQ_UI_TABLE_ROW_HEADER SQ_CONST_VARIABLE = "rowHeader";
const char * const SQ_UI_TABLE_COLUMN_HEADER SQ_CONST_VARIABLE = "columnHeader";
const char * const SQ_UI_TABS_COUNT SQ_CONST_VARIABLE = "count";
const char * const SQ_UI_TABS_ACTIVE_TAB SQ_CONST_VARIABLE = "activeTab";
const char * const SQ_UI_TABS_TAB_HEIGHT SQ_CONST_VARIABLE = "tabHeight";
const char * const SQ_UI_TABS_TAB_POSITION SQ_CONST_VARIABLE = "tabPosition";
const char * const SQ_UI_TABS_TAB_NAME SQ_CONST_VARIABLE = "tabName";
const char * const SQ_UI_TABS_TAB_WIDTH SQ_CONST_VARIABLE = "tabWidth";
const char * const SQ_UI_TEXT_BOX_TEXT SQ_CONST_VARIABLE = "text";
const char * const SQ_UI_WIDGET_TYPE SQ_CONST_VARIABLE = "type";
const char * const SQ_UI_WIDGET_X SQ_CONST_VARIABLE = "x";
const char * const SQ_UI_WIDGET_Y SQ_CONST_VARIABLE = "y";
const char * const SQ_UI_WIDGET_INPUT SQ_CONST_VARIABLE = "input";
const char * const SQ_UI_WINDOW_SCREEN_X SQ_CONST_VARIABLE = "screenX";
const char * const SQ_UI_WINDOW_SCREEN_Y SQ_CONST_VARIABLE = "screenY";
const char * const SQ_UI_WINDOW_BACKGROUND_COLOR SQ_CONST_VARIABLE = "backgroundColor";


const char * sq_widget_type_to_string ( SQWidgetType _type )
{
   switch ( _type )
   {
   case SQ_WIDGET_TYPE_UNKNOWN:
      return SQ_WIDGET_TYPE_UNKNOWN_STRING;

   case SQ_WIDGET_TYPE_WIDGET:
      return SQ_WIDGET_TYPE_WIDGET_STRING;

   case SQ_WIDGET_TYPE_CONTAINER:
      return SQ_WIDGET_TYPE_CONTAINER_STRING;

   case SQ_WIDGET_TYPE_BUTTON:
      return SQ_WIDGET_TYPE_BUTTON_STRING;

   case SQ_WIDGET_TYPE_LABEL:
      return SQ_WIDGET_TYPE_LABEL_STRING;

   case SQ_WIDGET_TYPE_CHECK_BOX:
      return SQ_WIDGET_TYPE_CHECK_BOX_STRING;

   case SQ_WIDGET_TYPE_RADIO_BUTTON:
      return SQ_WIDGET_TYPE_RADIO_BUTTON_STRING;

   case SQ_WIDGET_TYPE_TEXT_BOX:
      return SQ_WIDGET_TYPE_TEXT_BOX_STRING;

   case SQ_WIDGET_TYPE_MENU_BAR:
      return SQ_WIDGET_TYPE_MENU_BAR_STRING;

   case SQ_WIDGET_TYPE_MENU_ITEM:
      return SQ_WIDGET_TYPE_MENU_ITEM_STRING;

   case SQ_WIDGET_TYPE_STATUS_BAR:
      return SQ_WIDGET_TYPE_STATUS_BAR_STRING;

   case SQ_WIDGET_TYPE_SLIDER:
      return SQ_WIDGET_TYPE_SLIDER_STRING;

   case SQ_WIDGET_TYPE_SCROLL_AREA:
      return SQ_WIDGET_TYPE_SCROLL_AREA_STRING;

   case SQ_WIDGET_TYPE_TABLE:
      return SQ_WIDGET_TYPE_TABLE_STRING;

   case SQ_WIDGET_TYPE_TABS:
      return SQ_WIDGET_TYPE_TABS_STRING;

   case SQ_WIDGET_TYPE_TOOL_BAR:
      return SQ_WIDGET_TYPE_TOOL_BAR_STRING;

   case SQ_WIDGET_TYPE_PROGRESS_BAR:
      return SQ_WIDGET_TYPE_PROGRESS_BAR_STRING;

   case SQ_WIDGET_TYPE_LIST:
      return SQ_WIDGET_TYPE_LIST_STRING;

   case SQ_WIDGET_TYPE_COMBO_BOX:
      return SQ_WIDGET_TYPE_COMBO_BOX_STRING;


   default:
      return SQ_WIDGET_TYPE_UNKNOWN_STRING;
   }
}
